Why does console.logging outside a function work as intended but doing so inside one marks my value

visit shbcf.ru